import sys, pygame

BLACK = 0, 0, 0
WHITE = 255, 255, 255
SIZE = width, height = 800, 600

pygame.init()
screen = pygame.display.set_mode(SIZE)
pygame.display.set_caption("RU Defense")

clock = pygame.time.Clock()

ball = pygame.image.load("stopped.png").convert()
ballrect = ball.get_rect()

screen.fill(WHITE)

dirt_recs = []

while 1:
	for event in pygame.event.get():
		if event.type == pygame.QUIT:
			sys.exit()

	ballrect = ballrect.right
	if ballrect.left < 0 or ballrect.right > width:
		speed[0] = -speed[0]
	if ballrect.top < 0 or ballrect.bottom > height:
		speed[1] = -speed[1]

	screen.blit(ball, ballrect)
	dirt_recs.append(ballrect)
	pygame.display.update(dirt_recs)
#  pygame.display.flip()
